package com.qf.mybatisplus.bean.vo;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.json.JSONObject;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * @author 12136
 * @version 1.0
 * @description: TODO
 * @date 2022/3/18 9:55
 */
@Data
@Api
public class TestVo {

    @ApiModelProperty(value = "id", name = "id", dataType = "Integer", example = "1")
    private Integer id;

    @NotNull(message = "姓名不能为空")
    @ApiModelProperty(value = "姓名", name = "name", dataType = "String", example = "小明")
    private String name;

    @NotBlank(message = "身份证不能为空")
    @ApiModelProperty(value = "身份证号", name = "idCard", dataType = "String", example = "412725199805108888")
    private String idCard;

    @Min(value = 1,message = "年龄大于1岁")
    @ApiModelProperty(value = "年龄", name = "age", dataType = "Integer", example = "12")
    private Integer age;


    @ApiModelProperty(value = "朋友", name = "friend", dataType = "java.util.List",required = false,example = "[{\"math\":\"张老师\",\"eng\":\"李老师\",\"Chinese\":\"王老师\"},{\"math\":\"张老师\",\"eng\":\"李老师\",\"math\":\"李老师\"}]")
    private List<Person> friend;

    @ApiModelProperty(value = "老师",dataType = "Object",required = false,example = "{\"math\":\"张老师\",\"eng\":\"李老师\",\"Chinese\":\"王老师\"}")
    private JSONObject teacher;




    @Data
    public static class Person{
        private String name;
        private String gender;
    }


}
